package com.imooc.quartzDemo.job;

import lombok.Data;
import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
@Data
public class HelloJob implements BaseJob {
    private static Logger log = LoggerFactory.getLogger(HelloJob.class);

    private String message;
    private float floatJobValue;
    private double doubleTriggerValue;

    public HelloJob(){}
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        Date date=new Date();
        DateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        log.info("current exe time:"+ format.format(date));
        log.info("hello world");
    }
}
